#include "Clog.h"


CLog::CLog(void)
{
	ofs.open("log.txt", ios::app);
}


CLog::~CLog(void)
{
	ofs.close();
}

CLog::CLog(const char* file)
{
	assert(file != NULL);
	if (ofs)
	{
		ofs.open(file, ios::app);
	} 
	else
	{
		assert(false);
	}	
}

void CLog::Write(const char* strMessage)
{
	if (ofs)
	{
		ofs<<strMessage<<endl;
	} 
	else
	{
		assert(false);
	}
}